# -*- coding: utf-8 -*-
#
# Copyright (c) 2011 BidiX (http://bidix.info)
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.
#
"""
	Global application configuration
"""
import os, sys

ROOT_PATH = os.path.dirname(__file__)
sys.path.append(os.path.realpath(ROOT_PATH+'/lib/Markdown-2.2.0'))
sys.path.append(os.path.realpath(ROOT_PATH+'/lib/Pygments-1.5'))

config = {
		# file system parameters
		'root_path': ROOT_PATH,
		'static_root_path': ROOT_PATH + '/static',
		'file_template_root_path': ROOT_PATH + '/templates',
		# wiki parameters
		'file_charset': 'utf-8',
		'wiki_template_root_folder': 'wiki/templates',
		'wiki_template_support': True,
		'personal_wiki_template_support': True,
		'wiki_base_url': '/',
		'wiki_app_name': 'Notewiki',
		# wiki_with_sandbox : True
		# not logged user has contributor role on sandbox area ('__*' pages)
		# not logged user can edit '__*' pages
		# wiki_with_sandbox : False
		# not logged user has reader role on sandbox area ('__*' pages)
		'wiki_with_sandbox': True,
		# notewikiapp should control login
		'app_login_control': True,
		# hooks 
		'format_user_fn': None,	# format_user(current_url, base_url='/')
		}